<#include "user_manager_header.ftl">

<div class="panel panel-default">
	<div class="panel-heading">
		<h3 class="panel-title">开放平台</h3>
	</div>
	<div class="panel-body">
		<ul class="nav nav-tabs">
			<li><a href="company_common_config_list">管理通用企业</a></li>
			<li class="active"><a
				href="company_common_config_update_manager">增加通用企业</a></li>
		</ul>
		<div>
			<p></p>
		</div>

		<div class="panel panel-default">
			<div class="panel-body">

				<form class="form-horizontal" role="form" id="form" method="post"
					action="company_common_config_update">
					<div class="form-group">
						<label for="companyholderphone" class="col-sm-2 control-label">企业电话</label>
						<div class="col-sm-6">
							<input type="hidden" class="form-control"
								value="${readonly?if_exists}" id="readonly" name="readonly" /><input
								type="hidden" class="form-control"
								value="${(companycommonconfig.companyHolderCode)?if_exists}"
								id="companyholdercode" name="companyholdercode" /><input
								type="text" class="form-control"
								value="${(companycommonconfig.companyHolderPhone)?if_exists}"
								name="companyholderphone" id="companyholderphone"
								placeholder="企业电话" required />
						</div>
					</div>
					<div class="form-group" id="code" ,name="code">
						<label for="companyholdercode" class="col-sm-2 control-label">企业编码</label>
						<div class="col-sm-6">
							<input type="text" class="form-control"
								value="${(companycommonconfig.companyCode)?if_exists}"
								id="companycode" name="companycode" placeholder="企业编码" />
						</div>
					</div>

					<div class="form-group">
						<label class="col-sm-2 control-label">企业性质</label>
						<div class="col-sm-6">
							<select class="selectpicker" name="enterprisenature"
								id="enterprisenature" required>
								<option value="0">一般企业</option>
								<option value="1" selected="selected">煤炭企业</option>
							</select>
						</div>
					</div>

					<div class="form-group">
						<label for="typename" class="col-sm-2 control-label">运费限制</label>
						<div class="col-sm-6">
							<input type="text" class="form-control"
								value="${(companycommonconfig.stockCostLimit)?if_exists}"
								name="stockcostlimit" id="stockcostlimit" placeholder="运费限制"
								required autofocus />
						</div>
					</div>

					<div class="form-group">
						<label for="typename" class="col-sm-2 control-label">企业报表识别标志</label>
						<div class="col-sm-6">
							<input type="text" class="form-control"
								value="${(companycommonconfig.companyReportFlag)?if_exists}"
								name="companyreportflag" id="companyreportflag"
								placeholder="企业报表识别标志" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">是否车队长模式</label>
						<div class="col-sm-6">
							<select class="selectpicker" id="standard" name="standard"
								required> <#if
								(companycommonconfig.leaderDriverModel)?if_exists>
								<option value="false">否</option>
								<option value="true" selected="selected">是</option> <#else>
								<option value="false" selected="selected">否</option>
								<option value="true">是</option> </#if>
							</select>
						</div>
					</div>
					<div class="form-group">
						<label for="typename" class="col-sm-2 control-label">签到半径(米)</label>
						<div class="col-sm-6">
							<input type="text" class="form-control"
								value="${(companycommonconfig.signInRadius)?if_exists}"
								name="signinradius" id="signinradius" placeholder="签到半径(米)"
								required />
						</div>
					</div>
					<div class="form-group">
						<div class="col-sm-offset-2 col-sm-10">
							<button type="submit" class="btn btn-default" id="button"
								${(companycommonconfig.companyHolderCode)?if_exists}>提交</button>
						</div>
					</div>
				</form>

			</div>
			<!--/panel-body-->

		</div>
		<div class="panel-footer"></div>
	</div>

	<blockquote>
		<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.
			Integer posuere erat a ante.</p>
		<footer>Luther</footer>
	</blockquote>

	<#include "user_manager_footer.ftl">

	<script type="text/javascript">
		$().ready(function() {
			$('.selectpicker').selectpicker();
			//
			if (document.getElementById("readonly").value == "UPDATE") {
				document.getElementById("companycode").readOnly = true;
				document.getElementById("companyholderphone").readOnly = true;
			} else {
				$("#code").hide();
			}

		});
	</script>